#define MAX_PCB_SIZE 4
#define PCB_LEN sizeof(struct PCB)

// definition of PCB 

typedef struct PCB {
int pcb_id;
char* pcb_name;
//char pcb_name;
int pcb_sta;
int pcb_pri;
} mpx_pcb;


// various functions of management

/*
mpx_pcb* allo_pcb ();
int free_pcb ( );
set_pcb( );
//int loca_pcb ( );// return the pcb_id found
//int ins_pcb( );  //
//rem_pcb();

*/



mpx_pcb* allo_pcb ( ){

mpx_pcb*  p;
p = (mpx_pcb*)malloc(PCB_LEN);
return p;

}


mpx_pcb* set_pcb(mpx_pcb* p,int n, char a[], int b, int c ) {
p->pcb_id = n;
p->pcb_name=a;
//p->pcb_name=a;
p->pcb_sta=b;
p->pcb_pri=c;
return p;
}

//NEEDS TO HANDLE ERRORS
int free_pcb(mpx_pcb* p){

free(p);
return 1;
}

